package com.sunzr0119.conventioncentertemplatebackend.entity;

import com.sunzr0119.conventioncentertemplatebackend.dto.UserRegisterDTO;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.data.annotation.Id;

@Data
@NoArgsConstructor
public class User {
    @Id
    private String id;
    private String username;
    private String password;
    private String email;
    private String phone;
    private String address;
    private String userRole;

    public User(UserRegisterDTO userRegisterDTO) {
        this.username = userRegisterDTO.getUserName();
        this.password = userRegisterDTO.getUserPassword();
        this.email = userRegisterDTO.getUserEmail();
        this.phone = userRegisterDTO.getUserPhoneNum();
        this.address = userRegisterDTO.getUserCompany();
    }
}
